import { RouteRecordRaw } from 'vue-router'
import { RadarChartOutlined,HomeOutlined,TableOutlined,IdcardOutlined,SettingOutlined } from "@ant-design/icons-vue";
export const routes: Array<RouteRecordRaw> = [
  //首页
  {
    path: "/",
    name: "/",
    redirect: "/home",
    meta: { title: '首页', sort: 1,icon:HomeOutlined },
    component: () => import("@/design/scaffold/index.vue"),
    children: [
      {
        path: "/home",
        name: "Home",
        meta: { title: '首页' },
        component: () => import("@/view/Home/index.vue")
      }
    ]
  },
    //表格
    {
      path: "/table",
      name: "table",
      redirect: "/table-index",
      meta: { title: '表格', sort: 2,icon:TableOutlined},
      component: () => import("@/design/scaffold/index.vue"),
      children: [
        {
          path: "/table-index",
          name: "TableIndex",
          meta: { title: '表格' },
          component: () => import("@/view/Table/index.vue")
        }
      ]
    },
  //主题
  {
    path: "/theme",
    name: "Theme",
    redirect: "/theme-index",
    meta: { title: '主题', sort: 998,icon:RadarChartOutlined },
    component: () => import("@/design/scaffold/index.vue"),
    children: [
      {
        path: "/theme-index",
        name: "ThemeIndex",
        meta: { title: '主题' },
        component: () => import("@/view/Theme/index.vue")
      },
      {
        path: "/theme-template",
        name: "ThemeTemplate",
        meta: { title: '模板' },
        component: () => import("@/view/Theme-template/index.vue")
      },
    ]
  },
  //设置
  {
    path: "/setting",
    name: "Setting",
    redirect: "/setting-index",
    meta: { title: '设置', sort: 999,icon:SettingOutlined },
    component: () => import("@/design/scaffold/index.vue"),
    children: [
      {
        path: "/setting-index",
        name: "SettingIndex",
        meta: { title: '设置' },
        component: () => import("@/view/Setting/index.vue")
      }
    ]
  },
  //权限
  {
    path: "/Permissions",
    name: "Permissions",
    redirect: "/permissions-index",
    meta: { title: '权限', sort: 1000,icon:IdcardOutlined},
    component: () => import("@/design/scaffold/index.vue"),
    children: [
      {
        path: "/permissions-index",
        name: "PermissionsIndex",
        meta: { title: '权限' },
        component: () => import("@/view/Permissions/index.vue")
      }
    ]
  },
  //登录
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/design/login/index.vue'),
    meta: {
      title: '登录',
      showLink: false,
    },
  },
  //报错
  {
    path: '/:pathMatch(.*)*',
    name: "NotFound",
    component: () => import('@/design/error/notFound.vue'),
    meta: {
      title: 'notFound',
      rank: 999,
      showLink: false
    }
  }
]